import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '../views/index/index.vue'
import doc from '../views/doc/index.vue'
import docBasic from '../views/doc/doc-basic.vue'
import docVue from '../views/doc/doc-vue.vue'
import docUni from '../views/doc/doc-uni.vue'
import comp from '../views/comp/index.vue'
import comSence from '../views/comp/com-sence.vue'
import comCashier from '../views/comp/com-cashier.vue'
import comKeybord from '../views/comp/com-keybord.vue'
import comAddress from '../views/comp/com-address.vue'
import comAgreement from '../views/comp/com-agreement.vue'
import comAlipayGetCoupon from '../views/comp/com-alipay-get-coupon.vue'
import comBalanceModule from '../views/comp/com-balance-module.vue'
import comColorUI from '../views/comp/com-colorui.vue'
import comBanner from '../views/comp/com-banner.vue'
import comGoHomeIcon from '../views/comp/com-go-home-icon.vue'
import comCompressFile from '../views/comp/com-compress-file.vue'
import comSetMeal from '../views/comp/com-set-meal.vue'
import comConfirm from '../views/comp/com-confirm.vue'

import apply from '../views/apply/index.vue'
import appCard from '../views/apply/app-card.vue'
import appHexagon from '../views/apply/app-hexagon.vue'
import appLoading from '../views/apply/app-loading.vue'
import appShades from '../views/apply/app-shades.vue'
import appLight from '../views/apply/app-light.vue'
import appTabbar from '../views/apply/app-tabbar.vue'
import appEffect from '../views/apply/app-effect.vue'
import appHover from '../views/apply/app-hover.vue'
import appToggle from '../views/apply/app-toggle.vue'
import appCrop from '../views/apply/app-crop.vue'
import appAlert from '../views/apply/app-alert.vue'
import appCart from '../views/apply/app-cart.vue'
import appPlcheck from '../views/apply/app-plcheck.vue'
import appWater from '../views/apply/app-water.vue'
import appDgsort from '../views/apply/app-dgsort.vue'
import appDglayout from '../views/apply/app-dglayout.vue'
import appKeybord from '../views/apply/app-keybord.vue'
import appCovers from '../views/apply/app-covers.vue'
import appZip from '../views/apply/app-zip.vue'
import appInput from '../views/apply/app-input.vue'
import appCharge from '../views/apply/app-charge.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      children: [
        {
          path: '',
          name: 'doc',
          alias: '/doc',
          component: doc,
          children: [
            {
              path: '',
              name: 'basic',
              alias: '/basic',
              component: docBasic
            },
            {
              path: 'vue',
              name: 'vue',
              component: docVue
            },
            {
              path: 'uni',
              name: 'uni',
              component: docUni
            }
          ]
        },
        {
          path: 'comp',
          name: 'comp',
          component: comp,
          children: [
            {
              path: '',
              name: 'sence',
              alias: '/sence',
              component: comSence
            },
            {
              path: 'cashier',
              name: 'cashier',
              component: comCashier
            },
            {
              path: 'keybord',
              name: 'compbord',
              component: comKeybord
            },
            {
              path: 'address',
              name: 'address',
              component: comAddress
            },
            {
              path: 'agreement',
              name: 'agreement',
              component: comAgreement
            },
            {
              path: 'alipayGetCoupon',
              name: 'alipayGetCoupon',
              component: comAlipayGetCoupon
            },
            {
              path: 'balanceModule',
              name: 'balanceModule',
              component: comBalanceModule
            },
            {
              path: 'colorui',
              name: 'colorui',
              component: comColorUI
            },
            {
              path: 'banner',
              name: 'banner',
              component: comBanner
            },
            {
              path: 'goHomeIcon',
              name: 'goHomeIcon',
              component: comGoHomeIcon
            },
            {
              path: 'compressFile',
              name: 'compressFile',
              component: comCompressFile
            },
            {
              path: 'setMeal',
              name: 'setMeal',
              component: comSetMeal
            },
            {
              path: 'confirm',
              name: 'confirm',
              component: comConfirm
            }
          ]
        },
        {
          path: 'apply',
          name: 'apply',
          component: apply,
          children: [
            {
              path: '',
              name: 'card',
              alias: '/card',
              component: appCard
            },
            {
              path: 'hexagon',
              name: 'hexagon',
              component: appHexagon
            },
            {
              path: 'loading',
              name: 'loading',
              component: appLoading
            },
            {
              path: 'shades',
              name: 'shades',
              component: appShades
            },
            {
              path: 'light',
              name: 'light',
              component: appLight
            },
            {
              path: 'tabbar',
              name: 'tabbar',
              component: appTabbar
            },
            {
              path: 'effect',
              name: 'effect',
              component: appEffect
            },
            {
              path: 'hover',
              name: 'hover',
              component: appHover
            },
            {
              path: 'toggle',
              name: 'toggle',
              component: appToggle
            },
            {
              path: 'crop',
              name: 'crop',
              component: appCrop
            },
            {
              path: 'alert',
              name: 'alert',
              component: appAlert
            },
            {
              path: 'cart',
              name: 'cart',
              component: appCart
            },
            {
              path: 'plcheck',
              name: 'plcheck',
              component: appPlcheck
            },
            {
              path: 'water',
              name: 'water',
              component: appWater
            },
            {
              path: 'dgsort',
              name: 'dgsort',
              component: appDgsort
            },
            {
              path: 'dglayout',
              name: 'dglayout',
              component: appDglayout
            },
            {
              path: 'keybord',
              name: 'appbord',
              component: appKeybord
            },
            {
              path: 'covers',
              name: 'covers',
              component: appCovers
            },
            {
              path: 'zip',
              name: 'zip',
              component: appZip
            },
            {
              path: 'input',
              name: 'input',
              component: appInput
            },
            {
              path: 'charge',
              name: 'charge',
              component: appCharge
            }
          ]
        }
      ]
    }
  ]
})

export default router
